<template>
  <div class="variety">
    <div class="card" v-for='(item,index) of this.$store.state.shop' :key='index'>
      <!-- 用字符串拼接:src="'http://127.0.0.1:3000/'+item.img" 获取存在服务器端的图片 -->
      <img :src="'http://127.0.0.1:3000/'+item.img">
      <h2>{{item.name}}</h2>
      <p>￥{{item.prices}}</p>
      <p>在售：{{item.sole}}</p>
      <button type="button">加入购物车</button>
    </div>
  </div>
</template>
<script>
  export default{
      data() {
        return {
        }
      },
      created() {

      }
  }
</script>

<style>
</style>
